<%--
  Created by IntelliJ IDEA.
  User: dzw
  Date: 2018/3/15
  Time: 12:25
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ page isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt_rt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%
  String path = request.getContextPath();
  String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>

<style>
  table p,table hr{
    margin: 5px 0;
  }
  table p{
    height: 17px;
  }
</style>

<table class="table table-striped table-bordered table-responsive">
  <tbody id="personInfoTable">
  <tr>
    <td width="14%" >姓名</td>
    <td width="14%" >${person.name}</td>
    <td width="14%" >性别</td>
    <td width="14%" >${person.gender}</td>
    <td width="14%" >出生日期</td>
    <td width="14%" ><fmt:formatDate pattern="yyyy年MM月" value="${person.birthday}" /></td>
    <td width="16%"  rowspan="5">
      <c:if test="${person.photo!=null}">
        <img id="personPhoto" src="../common/file/download?${person.photo.url}">
      </c:if>
      <c:if test="${person.photo==null}">暂无</c:if>
    </td>
  </tr>
  <tr>
    <td>民族</td>
    <td>${person.nation.name}</td>
    <td>籍贯</td>
    <td>${person.origin}</td>
    <td>出生地</td>
    <td>${person.birthPlace}</td>
  </tr>
  <tr>
    <td>入党时间</td>
    <td><fmt:formatDate pattern="yyyy年MM月" value="${person.joinPartyDate}" /></td>
    <td>参加工作时间</td>
    <td><fmt:formatDate pattern="yyyy年MM月" value="${person.joinWorkDate}" /></td>
    <td>健康状况</td>
    <td>${person.health}</td>
  </tr>
  <tr>
    <td>熟悉专业有何专长</td>
    <td colspan="2">${person.specialty}</td>
    <td>身份证号</td>
    <td colspan="2">${person.cardId}</td>
  </tr>
  <tr>
    <td>工作性质</td>
    <td colspan="5">${person.workNature.name}</td>
  </tr>
  <c:if test="${isDirector==1}">
    <tr>
      <td>政治面貌</td>
      <td colspan="6">${person.zzmm}</td>
    </tr>
  </c:if>
  <tr>
    <td rowspan="3">学历学位</td>
    <td colspan="6">${person.highEdu.name}</td>
  </tr>
  <tr>
    <td>全日制教育</td>
    <td colspan="2">${person.allDayEdu.name}</td>
    <td>毕业院校系及专业</td>
    <td colspan="2">${person.allDaySchool}</td>
  </tr>
  <tr>
    <td>在职教育</td>
    <td colspan="2">${person.jobEdu.name}</td>
    <td>毕业院校系及专业</td>
    <td colspan="2">${person.jobSchool}</td>
  </tr>
  <tr>
    <td colspan="2">现任职务</td>
    <td colspan="2">${person.nowPost}</td>
    <td>现任职时间</td>
    <td colspan="2"><fmt:formatDate pattern="yyyy年MM月" value="${person.nowPostDate}" /></td>
  </tr>
  <tr>
    <td colspan="2">所在区</td>
    <td colspan="2">${person.area}</td>
    <td>所在街道</td>
    <td colspan="2">${person.street.name}</td>
  </tr>

  <tr class="type-before">
    <td colspan="1">居民区</td>
    <td colspan="6">${person.resident.name}</td>
  </tr>
  <tr class="type-before">
    <td colspan="1">是否为一肩挑</td>
    <td colspan="6">${person.shoulder==1?"是":"否"} &nbsp;&nbsp;  <c:if test="${person.shoulder==1}">${person.shoulderDet}</c:if></td>
  </tr>
  <tr class="type-before">
    <td colspan="1">人员性质</td>
    <td colspan="6">${person.personNature.name}</td>
  </tr>

  <!-- 学历经历 -->
  <tr>
    <td rowspan="${fn:length(studyList)+1}">学习经历<br/>（自高中以来）</td>
    <td colspan="2">起止时间</td>
    <td colspan="3">学校</td>
    <td>所获学位</td>
  </tr>
  <c:forEach items="${studyList}" var="study" varStatus="index">
    <tr>
      <td colspan="2"><fmt:formatDate pattern="yyyy年MM月" value="${study.startDate}" /> - <fmt:formatDate pattern="yyyy年MM月" value="${study.endDate}" /></td>
      <td colspan="3">${study.school}</td>
      <td>${study.academicDegree}</td>
    </tr>
  </c:forEach>

  <!-- 工作经历 -->
  <tr>
    <td rowspan="${fn:length(workList)+1}">工作经历</td>
    <td colspan="2">起止时间</td>
    <td colspan="2">工作单位及部门</td>
    <td>职务（职级）</td>
    <td>证明人</td>
  </tr>
  <c:forEach items="${workList}" var="work" varStatus="index">
    <tr>
      <td colspan="2"><fmt:formatDate pattern="yyyy年MM月" value="${work.workStartDate}" /> - <fmt:formatDate pattern="yyyy年MM月" value="${work.workEndDate}" /></td>
      <td colspan="2">${work.workDept}</td>
      <td>${work.workPost}</td>
      <td>${work.proveUser}</td>
    </tr>
  </c:forEach>

  <!-- 奖惩情况 -->
  <tr>
    <td>奖惩情况</td>
    <td colspan="6">${person.reward}</td>
  </tr>

  <!-- 家庭信息 -->
  <tr>
    <td rowspan="${fn:length(person.familyList)+1}">家庭主要成员及重要社会关系</td>
    <td>称谓</td>
    <td>姓名</td>
    <td>出生年月</td>
    <td>政治面貌</td>
    <td>学历学位</td>
    <td>工作单位及职务</td>
  </tr>
  <c:forEach items="${person.familyList}" var="family" varStatus="index">
    <c:if test="${family.state=='Enable'}">
      <tr>
        <td>${family.nickName}</td>
        <td>${family.familyName}</td>
        <td><fmt:formatDate pattern="yyyy年MM月" value="${family.familyBirthday}" /></td>
        <td>${family.politicalStatus}</td>
        <td>${family.familyEdu}</td>
        <td>${family.familyJob}</td>
      </tr>
    </c:if>
  </c:forEach>
  <tr>
    <td rowspan="2">家庭地址</td>
    <td rowspan="2" colspan="3">${person.familyAddress}</td>
    <td>联系电话</td>
    <td colspan="2">${person.phone}</td>
  </tr>
  <tr>
    <td>邮编</td>
    <td colspan="2">${person.zipCode}</td>
  </tr>
  </tbody>
</table>

<script>
  $(function(){
    var width = $("#personInfoTable").width();
    $("#personPhoto").css("width", 864*0.16+"px");
    $(".modal-dialog").eq(1).css("margin-top", 20+"px");
  })
</script>